package com.ruoyi.event.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.data.redis.core.RedisKeyExpiredEvent;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RedisKeyExpiredEventListener implements ApplicationListener<RedisKeyExpiredEvent<?>> {

    /**
     * Handle an application event.
     *
     * @param event the event to respond to
     */
    @Override
    public void onApplicationEvent(RedisKeyExpiredEvent<?> event) {
        log.info("检测到redis过期提醒----》{}", event);
    }
}
